package 注解;

/**
 * @author:谢君臣
 * @Date:2021/8/8-19:47
 * @version:1.0
 * @function:
 */
public class java原注解 extends Object {

    @Override
    public String toString() {
        return super.toString();
    }

    @Deprecated
    public static void  test(){
        System.out.println("过时的注解");
    }
    public static void main(String[] args) {
        System.out.println("" +
                "        @Override 重写父类的方法\n" +
                "        @Deprecated 方法过时提示\n" +
                "------------------------------------------------\n" +
                "        @Target(value = {ElementType.METHOD,\n" +
                "                ElementType.ANNOTATION_TYPE,\n" +
                "                ElementType.CONSTRUCTOR,\n" +
                "                ElementType.TYPE})  //定义注解使用类型\n" +
                "        @Retention(value = RetentionPolicy.RUNTIME) //注解生效地方\n" +
                "        @Documented // 注解是否可以生产在javadoc中 \n" +
                "        @Inherited  // 子类是可以继承");
    }
}
